<?php
	require_once 'config.php';
	require_once $fmSql;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<noscript> 
<meta http-equiv="refresh" content="1; URL=./nojs.php?u=creation_profil.php"> 
</noscript>
<link rel="stylesheet" type="text/css" href="css/style.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/style_inscription.css" media="all" />
<link href="js/star-rating/jquery.rating.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/jquery/jquery.js"></script> 
<script type="text/javascript" src="js/boite_outils.js"></script>
<script type="text/javascript" src="js/gestion_creation_profil.js"></script>
<script type="text/javascript" src="js/gestion_vote_film.js"></script>
<script src="js/star-rating/jquery.MetaData.js" type="text/javascript"></script>
<script src="js/star-rating/jquery.rating.js" type="text/javascript"></script>
<title>MovieAdvice</title>
</head>

<body>

<?php
require_once 'config.php';
require_once 'view/header.php'; 
?>

<div id="bloc_principal">

<div id="contenu">


<!-- introduction au système de création du profil de cinéphile -->
<div id="titre">Création de votre profil de cinéphile <br/> <p>Parmis les films suivants, lesquels avez-vous vus et quel note leur donneriez-vous?</p></div>


<!-- Bloc contenant les X meilleurs films notés par les membres -->
<div id="contenu_pointille_profil" align="center">
<?php
	for ($i=1; $i < 25; $i++) 
	{ 
		echo '<div  width="113" height="170" class="image_pochette" id="'.$i.'">';
			echo '<div><img src="images/pochettes/'.$i.'.jpg" width="113" height="170"/></div>';
			echo "<span class='noter_image_pochette' id='noter_image_pochette_".$i."'>";
				echo '<form method="get" id="form_project_note_'.$i.'" class="form_project_note" style="float: none;" action=".">';
					for ($j=1; $j < 21; $j++) { 
						echo '<input id="input_radio_'.$i.'_'.$j.'" class="star {split:4}" type="radio" name="star" value="'.$j.'"/>';
					}
				echo '</form>';
			echo "</span>";
			echo "<span class='desciption_film' id='desciption_film_".$i."'>";
				echo "Description";
			echo "</span>";
		echo '</div>';
		echo "<script type='text/javascript'>";
			echo '$("input.star").rating({
				  	callback: function(value, link){
					   	if (value != undefined) {
					   		add_vote_film('.$i.',value);
					   	}
					   	else
					   	{
					   		delete_vote_film('.$i.');
					   	}
				  	}
				});';
		echo "</script>";
	}
	echo "<div class='desciption_image_pochette'>";
	echo "</div>";
	$result = sql_film_affinite(2,10);
	foreach ($result as $key => $value) {
		echo $key;
	}
?>
</div>

<br/><br/><img src="images/bouton_suivant.png"/>

</div>

</div>

</body>
</html>